package team2.arsystem.GUI;

import android.app.Activity;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ViewReminders extends ListActivity {
	
	String[] reminderList = {"View Debit Reminders", 
			"View Credit Reminders",
			"Logout"	
			};

	String[] classList = {"ViewDebitReminders","ViewCreditReminders","Logout"};

	@Override
	protected void onCreate(Bundle savedInstanceState) {

			super.onCreate(savedInstanceState);
			setListAdapter(new ArrayAdapter<String>(ViewReminders.this,R.layout.listview,reminderList));
	}

	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {

			super.onListItemClick(l, v, position, id);
			try
			{
				Class nextScreen = Class.forName("team2.arsystem.GUI."+classList[position]);
				Intent menuSelectedIntent = new Intent(ViewReminders.this, nextScreen);
				startActivity(menuSelectedIntent);
			}
			catch(Exception e)
			{
				Log.e("Error",e.toString());
			}

	}


}
